/**
 * @作者 faner
 * @创建时间 2021/1/15 18:18
 */
package com.faner.fast.security.exception;

import com.faner.fast.security.component.FastAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.http.HttpStatus;

@JsonSerialize(using = FastAuth2ExceptionSerializer.class)
public class MethodNotAllowed extends FastAuth2Exception {

    public MethodNotAllowed(String msg, Throwable t) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "method_not_allowed";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.METHOD_NOT_ALLOWED.value();
    }

}

